﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace AirForceCDCTests
{
    /// <summary>
    /// Interaction logic for DebugWindow.xaml
    /// </summary>
    public partial class DebugWindow : Window
    {
        public DebugWindow()
        {
            InitializeComponent();
            debugBox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            debugBox.IsReadOnly = true;
            
        }

        private void close_Click(object sendoer, RoutedEventArgs e)
        {
            this.Close();
        }

        /// <summary>
        /// Adds a message to the debug window.
        /// </summary>
        /// <param name="message">Message to add to the debug window</param>
        public void AddMessage(string message)
        {
            debugBox.AppendText(message + "\n");
            debugBox.ScrollToEnd();
        }

        /// <summary>
        /// Clears the debug window
        /// </summary>
        public void ClearWindow()
        {
            debugBox.Text = "";
        }
    }
}
